import service from "@/utils/fetch";
const post = {
  //查询商户结算单
  tenantSettlementList(params) {
    return service({
      method: "get",
      params,
      url: "/api/tenantSettlement/",
    });
  },

  //查询商户结算单明细
  tenantSettlementDetail(id) {
    return service({
      method: "get",
      url: `/api/tenantSettlement/${id}`,
    });
  },

  //   审核商户结算单
  checkTenantSettlement(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/tenantSettlement/check",
    });
  },

  //   商户结算打款
  payoutTenantSettlement(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/tenantSettlement/payout",
    });
  },

  // 查询商户结算单订单列表分页
  tenantSettlementDetailList(params) {
    return service({
      method: "get",
      params,
      url: `/api/tenantSettlementDetail/list/${params.id}`,
    });
  },

  // 导出商户结算单订单列表
  exportTenantSettlement(params) {
    return service({
      method: "get",
      params,
      url: `/api/tenantSettlement/download`,
      responseType: "blob",
    }, true);
  },
};

export default post;
